x=eval(input("Please enter the first number:"))
y=eval(input("Please enter the second number:"))
z=x*y
if x<y:
    x,y=y,x
while x%y!=0:
    r=x%y
    x=y
    y=r
print("最大公约数 =",y)
print("最小公倍数 =",z//y)